t = ('python', 'C++', 'java', 'php')
'''
与列表的遍历完全相同

   

'''

# 根据索引访问元素
print(t[-1])

# 切片操作
t2 = t[0:3:2]
print(t2)

# 遍历元组
for i in t:
    print(i)

# for + range(len)
for i in range(len(t)):
    print(i, t[i])

# enumerate() 枚举e
for i, j in enumerate(t):
    print(i, j)

print('1' * 30)
for i, j in enumerate(t, start=11):  # 序号从11开始
    print(i, j)  # 11 python 12 C++ 13 java 14 php
